<?php
	include("operations\logout-result.php");	
	include 'handle/approve-handle.php';
	session_start();
	$id = $_GET['id'];
	$type = $_GET['type'];
	$action = $_GET['action'];
	if($action=="approve")
	{
		approve($_GET['group'], $_SESSION['IDEmployee']);
		header( 'Location: list-receiver-not-approved.php' );
	}
	else if($action=="reject"){
		reject($_GET['group'], $_SESSION['IDEmployee']);
		header( 'Location: list-receiver-not-approved.php' );
	}
	else if($action=="reference"){
		viewReference($_GET['group'], $_SESSION['IDEmployee']);
		header( 'Location: list-receiver-not-approved.php' );
	}
	else 
	{
		if($type==7)
		{
			$title = "Form 7";
			$content =  'content/view-form7-content.php';
		}
		else if ($type==12)
		{
			$title = "Form 12";
			$content =  'content/view-form12-content.php';
		}
		else if ($type==13)
		{
			$title = "Form 13";
			$content =  'content/view-form13-content.php';
		}
		else if ($type==15)
		{
			$title = "Form 15";
			$content = 'content/view-form15-content.php';
		}
		else if ($type ==14)
		{
			$title = "Form 14";
			$content =  'content/view-form14-content.php';
		}
		else if ($type ==16)
		{		
			$title = "Form 16";
			$content =  'content/view-form16-content.php';
		}
		else if ($type ==17)
		{
			$title = "Form 17";
			$content =  'content/view-form17-content.php';
		}
	}
	
	$_SESSION['lastpage'] = $url;
	
	require("templateMobile.php");
?>